package pers.zxk.jlytnews.dao;

import pers.zxk.jlytnews.entity.Food;
import pers.zxk.jlytnews.entity.FoodWithType;

import java.sql.SQLException;
import java.util.List;

public interface FoodDao {
    //添加菜品
    public boolean addFood(String name,int type,String image,String description,String remarks) throws SQLException, ClassNotFoundException;
    //通过id删除菜品
    public boolean delFood(int id) throws SQLException, ClassNotFoundException;
    //更新菜品
    public boolean updateFood(int id, String name, int type, String image, String description, String remarks) throws SQLException, ClassNotFoundException;
    //返回菜品
    public Food getFood(int id) throws SQLException, ClassNotFoundException;
    //返回指定类型的菜品；如，炒菜
    public List<Food> getFoods(int type) throws SQLException, ClassNotFoundException;
    //返回所有菜品
    public List<Food> getAllFood() throws SQLException, ClassNotFoundException;
    //返回所有菜品(合并foodtype表查询)
    public List<FoodWithType> getAllFoodWithType() throws SQLException, ClassNotFoundException;
}
